/**
 * Created by Administrator on 2015/12/22.
 */
var Promise = require('promise');
var logger = require('log4js').getLogger('activityService');
var activityDao = require('../dao/ActivityDao');
var activityService = {};


activityService.queryPage = function(pageNo,pageSize){
    return activityDao.getByPage(null,pageNo,pageSize,'create_time desc');
}

activityService.getActivity = function(activityId){
    return activityDao.getById(activityId);
}

activityService.update = function(a){
    a.updateTime = new Date();
    return activityDao.update(a);
}

module.exports = activityService;